package com.hiof.moraa.server.service.model;

public class TargetInfoPacket {

    private String targetName;
    private double predictedTime;//in minutes
    private double distance; //in meters
    private GeoPoint geoPoint;

    public TargetInfoPacket(String targetName, double predictedTime, double distance, GeoPoint geoPoint) {
        this.targetName = targetName;
        this.predictedTime = predictedTime;
        this.distance = distance;
        this.geoPoint = geoPoint;
    }

    public String getTargetName() {
        return this.targetName;
    }

    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }

    public double getPredictedTime() {
        return this.predictedTime;
    }

    public void setPredictedTime(double predictedTime) {
        this.predictedTime = predictedTime;
    }

    public String getMessage() {
        if (distance == 0) {
            return "Already finished the route";
        } else {
            return "You need to complete "
                    + distance
                    + " meters to finish " + targetName
                    + ", and with your current pace you will finish that in " + predictedTime + " minutes.";
        }
    }

    public double getDistance() {
        return this.distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public GeoPoint getGeoPoint() {
        return geoPoint;
    }

    public void setGeoPoint(GeoPoint geoPoint) {
        this.geoPoint = geoPoint;
    }
}
